package com.itany.mapper;


import com.itany.entity.User;
import com.itany.jdbc.util.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Author：汤小洋
 * Date：2022-11-15 9:32
 * Description：<描述>
 */
public class UserMapper implements RowMapper<User> {
    @Override
    public User mapRow(ResultSet rs) throws SQLException {
        User u = new User();
        u.setId(rs.getInt("id"));
        u.setName(rs.getString("name"));
        u.setPhone(rs.getString("phone"));
        u.setAddress(rs.getString("address"));
        u.setStatus(rs.getInt("status"));
        return u;
    }
}
